<?$this->_extends("_layouts/index_layout");?>
<?$this->_block("contents");?>
<script type="text/javascript">
<!--
function check(){
		return confirm('确定支付吗？');
	
}
//-->
</script>

<div id="gwzt2" class=" ztt"></div>
<div class="main">
  <div class="border1 colorbg2">
    <div class="colorbg mt5 ml5 mr5">
      <div class="white2">订单详情</div>
    </div>
    <div class="mb5 ml50 mr50 mt20"> 订单号：<span class="color3"><?php echo $orderData['order_number'];?></span> </div>
    <div class="ml50 mr50 mb5">下单时间：<?php echo date('Y-m-d H:i:s',$orderData['date_add']);?></div>
    <div class="ml50 mr50 mb5">订单状态：
      <?php if($orderData['order_flag'] == 1){echo '未付款';}elseif($orderData['order_flag']){echo '已付款';}?>
    </div>
    <div class="mb5 ml50 mr50 mt20">
      <table width="100%" border="0" cellspacing="1" cellpadding="5" bgcolor="#cc9999">
        <tr class="colorbg2" align="center" valign="middle">
          <td>课程ID</td>
          <td width="150">课程图片</td>
          <td width="180">课程名称</td>
          <td>课程价格</td>
        </tr>
        <?php
	$price_total = 0;
	foreach($myData as $k => $row){
		$price_total += $row->course->price;
	?>
        <tr align="center" valign="middle">
          <td bgcolor="#FFFFFF"><?php echo $row->course_id;?></td>
          <td width="150" bgcolor="#FFFFFF"><img src="<?=$_BASE_DIR.$row->course->img;?>" width="140" height="100" /></td>
          <td width="180" bgcolor="#FFFFFF"><?php echo $row->course->name;?></td>
          <td bgcolor="#FFFFFF">￥<?php echo $row->course->price;?></td>
        </tr>
        <?php
	}
	?>
      </table>
    </div>
    <div class="mb5 ml5 mr5 mt5 right"> 您共需为订单支付: <span class="color3 mr20">￥<?php echo $price_total;?></span> </div>
  </div>
  <div class="border1 mt20">
    <div class="colorbg mt5 ml5 mr5 white2"> 支付方式</div>
    <div class="ml50">账户余额：<span class="red2">0.00</span>元</div>
    <div class="ml50"><img src="<?=$_BASE_DIR;?>css/index/image/zf.png" width="920" height="464" /></div>
  </div>
  <div class="border1 mt20">
    <div class="colorbg mt5 ml5 mr5 white2">结算信息</div>
    <div class="mb5 ml50 mr5 mt20 fleft mb20"> 您共需为订单支付: <span class="color3 mr20">￥<?php echo $price_total;?></span> </div>
    <a href="<?php echo url('my/orderpay',array('order_id'=>$orderData['order_id']));?>" class="btn fleft mt20 mr20 mb20" onclick="return check()">确认支付</a>
    <div class="clear"></div>
  </div>
</div>
<?$this->_endblock();?>
